/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tc.maas.bulkfilerenamer.utils.enumerators;

/**
 *
 * @author michel
 */
public enum Delimiters {
    UNDERSCORE("_"),
    DOT("."),
    COMMA(","),
    TILDE("~"),
    EXCLAMATION("!"),
    AT("@"),
    HASH("#"),
    DOLLAR("$"),
    PERCENT("%"),
    SPACE_BREAK("%20"),
    CARET("^"),
    AMPERSAND("&"),
    ASTERISK("*"),
    BRACKET_LEFT("("),
    BRACKET_RIGHT(")"),
    HYPHON("-"),
    ADD("+"),
    EQUALS("="),
    ACCOLADE_LEFT("{"),
    ACCOLADE_RIGHT("}"),
    BLOCK_BRACKET_LEFT("["),
    BLOCK_BRACKET_RIGHT("]"),
    COLON(":"),
    SEMICOLON(";"),
    QUOTE("'"),
    DOUBLE_QUOTE('"'),
    PIPE("|"),
    FISH_HOOK_BRACKET_LEFT("<"),
    FISH_HOOK_BRACKET_RIGHT(">"),
    QUESTION_MARK("?"),
    SPACE(" ");
    
    private String delimiter;

    private Delimiters(String delimiter) {
        this.delimiter = delimiter;
    }

    private Delimiters(char delimiter) {
        this.delimiter = String.valueOf(delimiter);
    }

    public String getDelimiterString(){
        return delimiter;
    }

    public static Delimiters getDelimiterFromString(String symbol){
        Delimiters delimiters = null;
        for(Delimiters d : Delimiters.values()){
            if(d.getDelimiterString().equals(symbol)){
                delimiters = d;
            }
        }
        return delimiters;
    }

    public static boolean contains(String symbol){
        boolean contains = true;
        if(getDelimiterFromString(symbol) == null){
            contains = false;
        }
        return contains;
    }
}
